package com.pratik.test;

public class HelloWorld {
	
	private String name;
		
	public String getName() {
		return name;
	}

	public HelloWorld() {
		this.name = "World";
	}

	public HelloWorld(String name) {
		this.name = name;
	}

	public String sayHello() {
		return "Hello "+getName()+"!!!";
	}


	/**
	 * @param args
	 */
	public static void main(String[] args) {
		HelloWorld hWorld = new HelloWorld();
		System.out.println(hWorld.sayHello());
		
		HelloWorld hWorldWithName = new HelloWorld("Pratik");
		System.out.println(hWorldWithName.sayHello());
		
	}

}
